import request from '@/utils/request'

// 查询科目分类列表
export function listAccounts(query) {
  return request({
    url: '/system/accounts/list',
    method: 'get',
    params: query
  })
}

// 查询科目分类详细
export function getAccounts(id) {
  return request({
    url: '/system/accounts/' + id,
    method: 'get'
  })
}

// 新增科目分类
export function addAccounts(data) {
  return request({
    url: '/system/accounts',
    method: 'post',
    data: data
  })
}

// 修改科目分类
export function updateAccounts(data) {
  return request({
    url: '/system/accounts',
    method: 'put',
    data: data
  })
}

// 删除科目分类
export function delAccounts(id) {
  return request({
    url: '/system/accounts/' + id,
    method: 'delete'
  })
}
